package com.pks.datacenter.entity.basic;

import lombok.Data;
import lombok.EqualsAndHashCode;

import com.pks.util.coder.database.DBField;
import com.pks.util.coder.database.DBQuery;
import com.pks.util.coder.database.DBTable;
import com.pks.web.mybatis.entity.BasicEntity;


@Data
@EqualsAndHashCode(callSuper = true)
@DBTable(tags = "操作日志")
public class OperLog extends BasicEntity {
	
	
	private static final long serialVersionUID = 4112275538577412101L;

	@DBField(comment = "操作人")
	private Long userId;
	
	@DBField(comment = "操作人姓名")
	@DBQuery(value="like")
	private String userName;
	
	@DBField(comment = "操作模块")
	@DBQuery(value="like")
	private String operModule;
	
	@DBField(comment = "操作类型")
	@DBQuery(value = {"like","="})
	private String operType;
	
	@DBField(comment = "操作方法（针对接口）")
    private String methodName;
	
	@DBField(comment = "接口参数" , length = 2000)
    private String params;
    
	@DBField(comment = "请求ip")
    private String requestIp;
    
    @DBField(comment = "请求URL")
    private String requestUrl;
    
    @DBField(comment = "日志级别")
    private String logLevel;
	
    @DBField(comment = "操作内容" , length = 2000)
	private String content;
    
	@DBField(comment = "操作结果")
    private Integer operResult;
    
    @DBField(comment = "结果描述")
    private String operResultMsg;
    
    @DBField(comment = "请求耗时")
    private Long time;
    
    public OperLog(){
    	super();
    }
    
	public OperLog(String logLevel, Long time) {
		super();
		this.logLevel = logLevel;
		this.time = time;
	}
    
    
	
	
}
